Collection of Links to an attribute.

hi,
i would like to know that if we can collect all the links for a particular object and write the same against a particular object Attribute

Consider the case, SWDD_1 has links to SWRD_3 and SWRD_5. Now that the links of the object SWDD_1 should be recorded in the same object under the attribute "Links Collection". I am not albe to collect all the links to a string and place it. Can you pls. help me how to write a script for this.

Thanks
Lion29 - Mon Sep 21 06:30:45 EDT 2009

Re: Collection of Links to an attribute.
llandale - Mon Sep 21 13:44:46 EDT 2009

You can use the "analysis ... Wizard" to create a layout of information about linked objects, then use the Convert-Layout-to-AttrDXL function to turn it into an AttrDXL.

  • Louie

Re: Collection of Links to an attribute.
Lion29 - Tue Sep 22 05:23:55 EDT 2009

hi,
i do agree that the by performing the "Analysis --> Wizard", i will be able to view the links in the view. What i exactly require is to collect the links and put them into an user defined attribute. In other words, the user defined attribute should be the copy of the links from "Analysis --> Wizard".
This user defined attribute should be updated only when i run the dxl script.

In dxl i would like to know if there is any function to copy the links to an attibute.

Thanks for the information.
Matthew

Re: Collection of Links to an attribute.
llandale - Wed Sep 23 14:30:48 EDT 2009

Lion29 - Tue Sep 22 05:23:55 EDT 2009
hi,
i do agree that the by performing the "Analysis --> Wizard", i will be able to view the links in the view. What i exactly require is to collect the links and put them into an user defined attribute. In other words, the user defined attribute should be the copy of the links from "Analysis --> Wizard".
This user defined attribute should be updated only when i run the dxl script.

In dxl i would like to know if there is any function to copy the links to an attibute.

Thanks for the information.
Matthew

When you say 'collect the links' I think you should say 'display link information'.

Creating a layout and then converting it to an AttrDXL is creating an attribute that displays the info you want. It does not make sense to edit that value, since its calculated. You can also take a copy of the layout and build and on-demand script that plows through all the objects of a module, but instead of 'display' or 'displayRich' you would accumulate all the 'displays' separateing them with EOLs, and use something like 'oCurr.UserDefinedAttrName = richText(results)'.

It may look something like this:

Object oCurr
string NameTargetAttr = "MyLinkDisplayAttr"
 
Buffer bufResults = create()
string EOL = ""
 
//*************
void   displayRich(string Message)
{    // overloaded, redefines the 'displayRich' command from the layout
    bufResults += EOL
    bufResults += Message
    EOL = "\n"
}
//*********************
void   display(string Message)
{    // Overloaded, redefines the 'display' command from the Layout
   displayRich(Message)
}
 
for oCurr in entire (current Module) do
{  bufResults = ""
   EOL        = ""
  <<Insert layout code here, replacing 'obj' with 'oCurr'>>
   oCurr.NameTargetAttr = richText(bufResults)
}
 
delete(bufResults)

 

 

  • Louie

 

 

Re: Collection of Links to an attribute.
Lion29 - Wed Sep 30 08:29:53 EDT 2009

hi,
i am not able to get what should be inserted into

<<Insert layout code here, replacing 'obj' with 'oCurr'>>

can you pls. give me a clue...

Re: Collection of Links to an attribute.
llandale - Wed Sep 30 10:49:38 EDT 2009

Lion29 - Wed Sep 30 08:29:53 EDT 2009
hi,
i am not able to get what should be inserted into

<<Insert layout code here, replacing 'obj' with 'oCurr'>>

can you pls. give me a clue...

You say you can indeed use the Wizard to produce a displayed column of what you want. That's the code you insert. You can get that code by
{code}
o Look at the module with that wizard column displayed.
o Right click on the column header, which may be labeled 'In-Links'.
o Select properties from the right-click pull-down.
o 'Layout' should be selected. Hit the http://Browse... button
o Hit the Current button
o In the 'Edit Layout DXL' window, cntl-A to select-all, then cntl-C to copy.
o Cancel, Cancel, Cancel to get back to the module.
o Find my code, find the right spot, and cntl-v to paste it.

  • Louie